<template lang="pug">
  kalix-search(title="考试查询" bizKey="overread"
  v-bind:searchForm="searchForm"
  v-bind:form-rules="rules"  )
    template(slot="searchFormSlot")
      el-form-item(label="考试名称" prop="name" v-bind:class="bindCls('name')" field="name" data-type="string")
        el-input(v-model.trim="searchForm.name")
      input(type="hidden" v-model="searchForm.subjectCode" v-bind:class="bindCls('subjectCode')" field="subjectCode" data-type="string")
</template>

<script>
  export default {
    name: 'OverReadSearch',
    data() {
      return {
        bizKey: 'overread',
        searchForm: {
          name: '',
          subjectCode: ''
        },
        rules: {
          name: [],
          subjectCode: []
        },
        searchFields: [
          {
            label: '考试名称',
            prop: 'name'
          },
          {
            type: 'inputHidden',
            prop: 'subjectCode',
            defaultVal: this.$KalixCatch.get('kalix-exam-overread-subjectCode')
          }
        ],
        m: ''
      }
    },
    methods: {
      bindCls(label) {
        return label.length > 0 ? `${this.bizKey}-${label}` : ''
      },
      changeValue(val) {
        this.searchForm.subjectCode = val
      }
    }
  }
</script>

<style scoped lang="stylus" type="text/stylus">
</style>
